﻿Imports System.Data.SqlClient
Imports PhDir.Model

Namespace Repository.DataReader
    Public Class DepartmentReader
        Implements IDataReader(Of Model.Department)

        Public Function Read(sqlDataReader As SqlDataReader) As Model.Department _
            Implements IDataReader(Of Model.Department).Read

            Dim department = New Model.Department With
                             {
                                 .DepartmentId = sqlDataReader("DepartmentId"),
                                 .DepartmentName = sqlDataReader("Department")
                             }
            Return department
        End Function

    End Class
End Namespace
